package com.oowoo.mq2es.util;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
/*
 * @Author ZhangBin
 * @Date 2019/12/7 1:21
 * @Description: 实践操作的工具类
 *
 **/
public class TimeUtil {
    public static LocalDateTime getDateTimeOfTimestamp(long timestamp) {
        Instant instant = Instant.ofEpochMilli(timestamp);
        ZoneId zone = ZoneId.systemDefault();
        return LocalDateTime.ofInstant(instant, zone);
    }
}
